<template>
	<view >
		<video id="video" :show-center-play-btn="false"  :src="video_address" autoplay="true"></video>
<!-- 		<view class="bottom-box d-flex align-items-center justify-evenly px-3 py-1">
			<image :src="vuex_likeblog.includes(id) ? '../../static/website/collect.svg' : '../../static/website/collect-white.svg'" mode="" class="img-56rpx" 
				@click="d_toggleLikeblog_throttle(id)"></image>
			<view class="border-center mx-3"></view>
			<image :src="vuex_saveblog.includes(id) ? '../../static/website/star-fill.svg' : '../../static/website/star-white.svg'" class="img-56rpx"
				@click="d_toggleSaveblog_throttle(id)"></image>
		</view> -->
	</view>
</template>

<script>
	import {
		http_blogdetail,
	} from '@/common/api.js';
	export default{
		data(){
			return{
				id: '',
				video_address: ''
			}
		},
		onLoad(options) {
			let id = options.id
			this.id = parseInt(id)
			http_blogdetail({params: {id: id}})
				.then((res) => {
					console.log(res);
					if (1 == res.code) {
						this.video_address = res.data.videoaddress
						
						this.shareTitle = res.data.name
						this.shareDesc = res.data.summary
						this.share5v4Image = res.data.cover5v4image
						this.share1v1Image = res.data.cover1v1image
						
						// #ifdef H5
						this.share()
						// #endif
					}
				})
		},
	}
</script>

<style lang="scss" scoped>
	#video{
		width: 100%;
		height: calc(100vh - var(--window-top));
	}
	.bottom-box {
		background: #40C6A1;
		border-radius: 52rpx;
		position: fixed;
		bottom: 86rpx;
		left: 50%;
		transform: translate(-50%, 0);
	}
	
	.border-center {
		width: 2rpx;
		height: 76rpx;
		background-color: #79DBC0;
	}
	
	.img-56rpx {
		width: 56rpx;
		height: 56rpx;
		vertical-align: middle;
	}
</style>